In [1]:
import pandas as pd
from matplotlib import pyplot as plt
%matplotlib inline

Subscription Diff Initial Latency

Using clients/latencyMeasureSameQuery.go, we send 500 requests, 500ms apart, all with the same query and measure the latency until the broker responds with the initial subscription diff.

It is being run from a desktop computer on the UC Berkeley network w/ avg ping latency of 5.03ms.

These current tests are w/ 3 brokers attached to a 3 coordinator cluster, but only talking to a single broker.


In [18]:
datafile = "data/latency_subscriptiondiff_samequery_54_153_110_238.csv"
df = pd.read_csv(datafile,header=None)
df.columns=['latency']
df['latency'] /= float(1e6) # convert to milliseconds
ax = df.plot(kind='hist', bins=20, figsize=(15,8))
ax.set_title("Initial Diff Latency")
ax.set_ylabel("Latency (ms)")


Out[18]:
<matplotlib.text.Text at 0x7f99ba479cd0>

In [19]:
ax = df.plot(kind='line',figsize=(15,8))
ax.set_title("Initial Diff Latency")
ax.set_ylabel("Latency (ms)")
ax.set_xlabel("Sample #")


Out[19]:
<matplotlib.text.Text at 0x7f99ba0f8150>

Using clients/latencyMeasureDiffQuery.go, we send 500 requests, 1s apart, all with the same key but different values in the query and measure the latency until the broker responds with the initial subscription diff.

It is being run from a desktop computer on the UC Berkeley network w/ avg ping latency of 5.03ms


In [21]:
datafile = "data/latency_subscriptiondiff_diffquery_samekey_54_153_110_238.csv"
df = pd.read_csv(datafile)
df['latency'] /= float(1e6) # convert to milliseconds
ax = df.plot(kind='hist', bins=20, figsize=(15,8))
ax.set_title("Initial Diff Latency")
ax.set_ylabel("Latency (ms)")


Out[21]:
<matplotlib.text.Text at 0x7f99ba4b9710>

In [22]:
ax = df.plot(kind='line',figsize=(15,8))
ax.set_title("Initial Diff Latency")
ax.set_ylabel("Latency (ms)")
ax.set_xlabel("Sample #")


Out[22]:
<matplotlib.text.Text at 0x7f99ba065bd0>

In [ ]: